-
Notifications
You must be signed in to change notification settings - Fork 32
🐛✨ [Frontend] Improve latest version fetching workflow #7054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛✨ [Frontend] Improve latest version fetching workflow #7054
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7054 +/- ##
==========================================
- Coverage 87.69% 87.68% -0.01%
==========================================
Files 1629 1629
Lines 63454 63454
Branches 2047 2047
==========================================
- Hits 55644 55639 -5
- Misses 7474 7479 +5
Partials 336 336
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
|
💪 |
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
ignapas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does that mean that now the front-end code is never cached?
Nope, with this approach, I believe that every time there is new version, clients will fetch the new code. The |
|



What do these changes do?
There is currently a mechanism in place to detect whether the webserver has a different version of frontend compared to the one the user's browser has. If that's the case a "Reload" button, that requests the newest version, is shown to the users.
In order to figure out that the user's browser is actually using a cached (different) version, we compare the
vcsRefClientstamped in a configuration file (that can be cached) and thevcsRefClientthat is included in the response to the/app-summaryresource (which is NOT cached).When the user hits the oSparc's "Reload" button, what oSparc does is add a random query parameter to the cacheable resources, forcing the browser to pull the latest version.
But when the user hits browser's reload button, the old-cached version might be loaded, hence the oSparc's Reload button would show up again, bringing the user to an endless loop:
In the animation:
no-cache=random_numberquery parameter and force the pull of the newest version (2)In this PR, the application loading pieces were tuned after compilation, making this random query parameter always be present.
Related issue/s
closes #6697
How to test
Dev-ops checklist